﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Data.SqlClient;

/// <summary>
/// Summary description for DangKy
/// </summary>
public class DangKy
{
    public DangKy()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    DataConnection data = new DataConnection();

    public DataTable ThemKH(string hoten, string tendn, string matkhau, bool gioitinh, string ngaysinh, string diachi, string email, string dienthoai)
    {
        string sql = "insert into KhachHang(HoTen,TenDN,MatKhau,GioiTinh,NgaySinh,DiaChi,Email,DienThoai) values(@HoTen,@TenDN,@MatKhau,@GioiTinh,@NgaySinh,@DiaChi,@Email,@DienThoai)";
        SqlParameter p1 = new SqlParameter("@HoTen", hoten);
        SqlParameter p2 = new SqlParameter("@TenDN", tendn);
        SqlParameter p3 = new SqlParameter("@MatKhau", matkhau);
        SqlParameter p4 = new SqlParameter("@GioiTinh", gioitinh);
        SqlParameter p5 = new SqlParameter("@NgaySinh", ngaysinh);
        SqlParameter p6 = new SqlParameter("@DiaChi", diachi);
        SqlParameter p7 = new SqlParameter("@Email", email);
        SqlParameter p8 = new SqlParameter("@DienThoai", dienthoai);
        return data.GetData(sql, p1, p2, p3, p4, p5, p6, p7, p8);

    }
}